import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment

abstract class BaseFragment<P : IPresenter> : Fragment(), IFragment, IVIew {
    protected lateinit var mview: View
    protected lateinit var mypre: P
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        mview = inflater.inflate(findlayout(), container, false)
        return mview
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)

        initView()
        initData()

    }

    override fun <T : View> findViewById(id: Int): T {
        return mview.findViewById(id)
    }

    override fun showDialog() {


    }

    override fun showMsg(msg: String) {
    }

    override fun hideDialog() {
    }
}